Sensory inputs are not represented faithfully in the brain. Rather, they are integrated with the information provided by the animal's internal states that are affected by factors including arousal, attention, prediction and experience. This integration process is impaired in psychiatric disorders such as schizophrenia and attention deficit hyperactivity disorder. Despite the scientific and clinical importance, our knowledge is limited as to the neural circuit mechanisms of how external sensory (`bottom-up') information and internally-generated (`top-down') information are integrated and how these processes are affected with experience and learning. We propose to combine cutting-edge techniques to gain a mechanistic insight into the dynamics and regulation of bottom-up and top-down inputs onto the primary visual cortex (V1) of mice. We will study how these processes are influenced by passive sensory experience and learning. Towards this goal, we have developed a visually-guided active avoidance task for head-fixed mice. In Aim 1, we will use chronic two-photon calcium imaging to record the activity of V1 L2/3 excitatory neurons and the sources of their bottom-up and top-down inputs during passive experience and association learning over days. We hypothesize that 1) sensory experience increases the weight of top-down inputs and decreases that of bottom-up inputs and 2) association learning induces L2/3 neurons to signal the potential timing of the associated event and this information is contained in top-down input activity. In Aim 2, we will test how the activity of local inhibitory circuits is influenced by visal experience. Bottom- up inputs to L2/3 neurons arrive at their perisomatic regions while top-down inputs arrive at their distal dendrites. Therefore, dendrite-targeting, somatostatin-expressing inhibitory neurons (SOM-INs) could regulate top-down inputs, and perisomatically-targeting, parvalbumin-positive inhibitory neurons (PV- INs) could control bottom-up inputs. We hypothesize that learning causes a reduction in SOM-IN activity and an increase in PV-IN activity. Such changes could accommodate the shift in the balance of bottom-up and top-down influences on V1 L2/3 neurons. In Aim 3, we will perform manipulation experiments to test some of the predictions of our model. We will test whether the learning-induced shift of activity timing of V1 L2/3 neurons requires 1) top-down inputs from higher cortical areas and 2) the reduction of SOM-IN activity. We will test these possibilities by 1) inactivating higher areas and 2) activating SOM-INs after learning on a trial-by-trial basis using optogenetics while monitoring the activity of V1 L2/3 neurons with calcium imaging. These experiments will reveal fine-scale circuit mechanisms governing dynamic sensory representations and also establish a paradigm to combine cutting-edge technologies that can be applied to other forms of learning and behaviors in the future.